<template>
  <!-- 全部景点 -->
  <div>
    <top-nav>
      <div class="div-top">景区列表</div>
    </top-nav>
    <InputNav></InputNav>
    <router-link v-for="em in menuNav" :to="{ name: em.name, query: { list: em.id } }" :key="em.id">
      <div class="box">
        <img class="photo" :src="em.img" alt="" />
        <div class="box-a">
          <span class="span1">{{ em.label }}</span>
          <div class="box-b">
            <span class="span2">{{ em.money }}</span>
            <span class="span3">{{ em.span }}</span>
          </div>
        </div>
        <div class="box-c">
          <img src="../assets/地址555@2x.png" alt="" />
          <span>{{ em.site }}</span>
        </div>
      </div>
    </router-link>
  </div>
</template>
<script>
import { getSceniclist } from '@/api/sceniclist';

export default {
  data() {
    return {
      menuNav: [],
    };
  },
  created() {
    this.getSceniclist();
  },
  methods: {
    async getSceniclist() {
      const { data } = await getSceniclist();
      this.menuNav = data;
    },
  },
};
</script>
<style lang="scss" scoped>
a {
  text-decoration: none;
}

.box {
  margin: 0 auto;
  width: 345px;
  height: 264px;
  box-shadow: 0 0 15px 0 rgba(21, 21, 21, 0.1);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  margin-top: 20px;

  .photo {
    width: 315px;
    height: 168px;
  }

  .box-a {
    display: flex;
    justify-content: space-between;
    width: 315px;

    .span1 {
      font-size: 18px;
      color: #333333;
      letter-spacing: 0;
    }

    .box-b {
      .span2 {
        font-size: 18px;
        color: #e52f17;
        letter-spacing: 0;
      }

      .span3 {
        font-size: 12px;
        color: #151515;
        letter-spacing: 0;
        line-height: 17px;
      }
    }
  }

  .box-c {
    width: 315px;

    img {
      width: 15px;
      height: 16px;
    }

    span {
      font-size: 14px;
      color: #bbbbbb;
    }
  }
}

.div-top {
  font-size: 17px;
  color: #333333;
  letter-spacing: 0;
  text-align: center;
}
</style>
